#include<stdio.h>
#include<conio.h>
int c[5000][5000],m,n,u,v,i,j;
int visited[5000],agree[5000];
int stack[100000],last=0;
long count=0;
void input(){
    FILE *fp=fopen("ADS.INP","r");
    fscanf(fp,"%d%d",&n,&m); 
    for(i=1;i<=m;i++){
        fscanf(fp,"%d%d",&u,&v);
        c[u][v]=c[v][u]=1;
    }
    fclose(fp);
}
/*int process(){
    int count=0;
    stack[last++]=1;
    agree[1]=1;
    do{
        u=stack[--last];
        for(i=1;i<=n;i++){
           if(i==1 && agree[u]==n-1 && c[i][u]==1)count++;
           else if(i!=u && c[i][u]==1 ){
                if(!visit[i]){
                    stack[last++]=u;
                    stack[last++]=i;
                    agree[i]=agree[u]+1;
                    visited[i]=1;
                }else if(trace
            }
*/
void process(int u){
    for(int i=2;i<=n;i++){
        if(c[u][i]==1 && i!=u){
            printf("( %d )",agree[i]);
            if(c[i][1]==1 && agree[i]==n){
                printf("OK %d\n",i);
                count++;
                return;
            }
            if(!visited[i]){
                printf("\n%d-->%d",u,i);
                agree[i]=agree[u]+1;
                visited[i]=1;
                process(i);
                visited[i]=0;
            }
        }
    }
}
int main(){
    input();
    agree[1]=visited[1]=1;
    process(1);
    printf("\nKet qua : %ld",count);
    getch();
    return 0;
}

                    
                
        
